package com.zjdiepu.www.commpent.mapper.system;

import javax.annotation.Resource;

import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.stereotype.Component;

import com.zjdiepu.www.base.core.BaseMapper;
import com.zjdiepu.www.base.enums.type.DataDicType;
import com.zjdiepu.www.commpent.RedisObjectClient;
import com.zjdiepu.www.ibiz.cache.ICachedDictionaryService;
import com.zjdiepu.www.model.base.dto.SimpleDataDictionary;
import com.zjdiepu.www.model.system.dto.OtherHoliday;
/**      
* 项目名称：dpqc-parent-manager-information   
* 类名称：OtherHolidaysVoMapper   
* 类描述：   节假日
* 创建人：zhangzj
* 创建时间：2017年5月11日 下午4:07:44   
* 修改人：zhangzj
* 修改时间：2017年5月11日 下午4:07:44   
* 修改备注：   
* @version V1.0     
*/ 
@Component
public class OtherHolidaysVoMapper extends BaseMapper<OtherHoliday>{
	@Resource
	private ICachedDictionaryService cachedDictionaryService;

	@Resource
	private RedisObjectClient redisObjectClient;
	
	@Override
	public void mapper(RedisConnection redisConnection,OtherHoliday m) {
		if(null == m) {
			return;
		}
		String dateType=m.getDateType();
		SimpleDataDictionary simpleDataDictionary = redisObjectClient.hGet(redisConnection, SimpleDataDictionary.class.getSimpleName(),dateType, DataDicType.DATE_TYPE.getCode());
		m.setDateTypeDisplay(simpleDataDictionary == null ? "" : simpleDataDictionary.getName());
	}

}
